
const Router = require("koa-router");
const inventoryController = require("./inventory.controller");
const router = new Router({ prefix: "/inventory" });
const { ApiDescribe } = require('@/logger/api-logger.middleware');

/**
 * 库存路由
 * @create_by Haor
 * @create_at 2025/07/24 16:38:36 
 * 
 */

// 新增库存
router.post("/", ApiDescribe('新增库存'), inventoryController.createInventory);
// 删除库存
router.delete("/:id", ApiDescribe('删除库存'), inventoryController.deleteInventory);
// 修改库存
router.put("/:id", ApiDescribe('修改库存'), inventoryController.updateInventory);
// 查询库存列表
router.get("/items", ApiDescribe('查询库存列表'), inventoryController.queryInventoryList);
// 查询库存
router.get("/:id", ApiDescribe('查询库存'), inventoryController.getInventoryItem);

module.exports = router;
            